<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Tom的博客">
    <meta name="keyword"  content="">
    <link rel="shortcut icon" href="/img/favicon.ico">

    <title>
        
        windows真的已经是最好的Linux发行版了 - Tom的博客
        
    </title>

    <!-- Custom CSS -->
    
<link rel="stylesheet" href="/css/aircloud.css">

    
<link rel="stylesheet" href="/css/gitment.css">

    <!--<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">-->
    <link href="//at.alicdn.com/t/font_620856_pl6z7sid89qkt9.css" rel="stylesheet" type="text/css">
    <!-- ga & ba script hoook -->
    <script></script>
<meta name="generator" content="Hexo 5.4.0"></head>

<body>

<div class="site-nav-toggle" id="site-nav-toggle">
    <button>
        <span class="btn-bar"></span>
        <span class="btn-bar"></span>
        <span class="btn-bar"></span>
    </button>
</div>

<div class="index-about">
    <i> 间歇性壮志凌云, 持续性混吃等死 </i>
</div>

<div class="index-container">
    
    <div class="index-left">
        
<div class="nav" id="nav">
    <div class="avatar-name">
        <div class="avatar ">
            <img src="/img/avatar.jpg" />
        </div>
        <div class="name">
            <i>Tom</i>
        </div>
    </div>
    <div class="contents" id="nav-content">
        <ul>
            <li >
                <a href="/">
                    <i class="iconfont icon-shouye1"></i>
                    <span>主页</span>
                </a>
            </li>
            <li >
                <a href="/tags">
                    <i class="iconfont icon-biaoqian1"></i>
                    <span>标签</span>
                </a>
            </li>
            <li >
                <a href="/archives">
                    <i class="iconfont icon-guidang2"></i>
                    <span>存档</span>
                </a>
            </li>
            <li >
                <a href="/about/">
                    <i class="iconfont icon-guanyu2"></i>
                    <span>关于</span>
                </a>
            </li>
            
            <li>
                <a id="search">
                    <i class="iconfont icon-sousuo1"></i>
                    <span>搜索</span>
                </a>
            </li>
            
        </ul>
    </div>
    
        <div id="toc" class="toc-article">
    <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#Windows%E4%B8%8B%E5%AE%89%E8%A3%85xserver"><span class="toc-text">Windows下安装xserver</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Linux%E4%B8%8B%E8%AE%BE%E7%BD%AE"><span class="toc-text">Linux下设置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%BAterminator%E5%88%9B%E5%BB%BA%E6%A1%8C%E9%9D%A2%E5%BF%AB%E6%8D%B7%E6%96%B9%E5%BC%8F"><span class="toc-text">为terminator创建桌面快捷方式</span></a></li></ol>
</div>
    
</div>


<div class="search-field" id="search-field">
    <div class="search-container">
        <div class="search-input">
            <span id="esc-search"> <i class="icon-fanhui iconfont"></i></span>
            <input id="search-input"/>
            <span id="begin-search">搜索</span>
        </div>
        <div class="search-result-container" id="search-result-container">

        </div>
    </div>
</div>

        <div class="index-about-mobile">
            <i> 间歇性壮志凌云, 持续性混吃等死 </i>
        </div>
    </div>
    
    <div class="index-middle">
        <!-- Main Content -->
        


<div class="post-container">
    <div class="post-title">
        windows真的已经是最好的Linux发行版了
    </div>

    <div class="post-meta">
        <span class="attr">发布于：<span>2019-12-22 21:53:19</span></span>
        
        <span class="attr">标签：/
        
        <a class="tag" href="/tags/#linux" title="linux">linux</a>
        <span>/</span>
        
        
        </span>
        <span class="attr">访问：<span id="busuanzi_value_page_pv"></span>
</span>
</span>
    </div>
    <div class="post-content no-indent">
        <p>使用过Linux的人应该都会有这种感觉，舍不得Linux的命令行又离不开Windows的桌面软件，这就会让我非常纠结，最终只能选择离不开的Windows。现在还好，还有wsl这个东西可以过一把Linux命令行的瘾，两个文件系统互通，基本上和Linux的命令行没什么区别了，但是Windows下却没有一个好的终端软件可以使用。自带的cmd和powershell谁用谁知道，比较有名的cmder用起来其实也挺不错的，但是慢，而且使用的时候有一些bug，比如在wsl里使用vim的时候nerdtree这个插件使用时就有问题。</p>
<p>不过最终还是找到了比较好的解决办法，既然Windows下的终端软件不给力，那就让wsl能够运行gui程序，直接使用Linux下的终端软件就好了。</p>
<h2 id="Windows下安装xserver"><a href="#Windows下安装xserver" class="headerlink" title="Windows下安装xserver"></a>Windows下安装xserver</h2><p>首先要在windows下安装xserver，推荐<a target="_blank" rel="noopener" href="https://sourceforge.net/projects/vcxsrv/">VcXsrv</a>或<a target="_blank" rel="noopener" href="https://sourceforge.net/projects/xming/">xming</a>，两个用起来差不多，安装完成后打开，使用默认设置，一直下一步就好了，最后finish，它会在后台运行。这两个都只支持1080p分辨率，如果你的电脑也是1080p的话没什么问题，如果你看惯了4k屏幕的话，使用的时候就会感觉比较模糊了，我用的就是4k屏幕，所以我的xserver软件选的是x410，这个只能在windows应用商店里装，而且要收费（￥354，打折￥71）。</p>
<h2 id="Linux下设置"><a href="#Linux下设置" class="headerlink" title="Linux下设置"></a>Linux下设置</h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 安装terminator</span></span><br><span class="line">sudo apt install terminator</span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 安装中文支持</span></span><br><span class="line">sudo apt install unifont</span><br></pre></td></tr></table></figure>
<p>在<code>.bashrc</code>中添加一行<code>export DISPLAY=:0</code>，这个时候你在wsl命令行里输入terminator就会打开一个窗口运行terminator了。但是这种运行方法，需要先打开一个终端，运行后终端还不能关闭，非常麻烦，不过还是有办法变得简单。</p>
<p><img src="../img/terminator.png" alt=""></p>
<h2 id="为terminator创建桌面快捷方式"><a href="#为terminator创建桌面快捷方式" class="headerlink" title="为terminator创建桌面快捷方式"></a>为terminator创建桌面快捷方式</h2><p>wsl下有个软件叫ubuntu-wsl（我用的ubuntu，如果你们不是，可能会有不同，<a target="_blank" rel="noopener" href="https://www.linuxidc.com/Linux/2019-07/159411.htm">参考</a>），这个软件可以帮我们在windows下创建一个Linux命令的桌面快捷方式，这样我们就可以像打开一个windows软件一样打开Linux软件了。</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 首先如果没有的话安装它</span></span><br><span class="line">sudo apt install ubuntu-wsl</span><br><span class="line"><span class="meta"></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> 然后使用wslusc工具创建链接</span></span><br><span class="line">wslusc -g terminator</span><br><span class="line"><span class="meta">#</span><span class="bash"> 这个时候你就可以看到桌面上多了一个terminator的快捷方式了</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> -g代表gui程序，还有一些其他的选项可以通过--<span class="built_in">help</span>查看</span></span><br></pre></td></tr></table></figure>
<p>讲道理的话其他的Linux gui程序也可以这样在windows上运行。</p>

        
            <div class="donate-container">
    <div class="donate-button">
        <button id="donate-button">赞赏</button>
    </div>
    <div class="donate-img-container hide" id="donate-img-container">
        <img id="donate-img" src="" data-src="/img/donate.jpg">
        <p> 感谢鼓励 </p>
    </div>
</div>
        
        <br />
        <div id="comment-container">
        </div>
        <div id="disqus_thread"></div>

        <div id="lv-container">
        </div>

    </div>
</div>

    </div>
</div>


<footer class="footer">
    <ul class="list-inline text-center">
        
        

        

        

        

        

    </ul>
    
    <p>
        <span id="busuanzi_container_site_pv">
            <span id="busuanzi_value_site_pv"></span>PV
        </span>
        <span id="busuanzi_container_site_uv">
            <span id="busuanzi_value_site_uv"></span>UV
        </span>
        Created By <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>  Theme <a target="_blank" rel="noopener" href="https://github.com/aircloud/hexo-theme-aircloud">AirCloud</a></p>
</footer>




<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ["$","$"], ["\\(","\\)"] ],
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
            processEscapes: true
        }
    });
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax();
        for (var i = 0; i < all.length; ++i)
            all[i].SourceElement().parentNode.className += ' has-jax';
    });
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</body>

<script>
    // We expose some of the variables needed by the front end
    window.hexo_search_path = "search.json"
    window.hexo_root = "/"
    window.isPost = true
</script>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>

<script src="/js/index.js"></script>

<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




</html>
